An energy-conserving formalism for adaptive gravitational force softening in SPH and N−body codes
نویسندگان
چکیده
In this paper we describe an adaptive softening length formalism for collisionless N−body and self-gravitating Smoothed Particle Hydrodynamics (SPH) calculations which conserves momentum and energy exactly. This means that spatially variable softening lengths can be used in N−body calculations without secular increases in energy. The formalism requires the calculation of a small additional term to the gravitational force related to the gradient of the softening length. The extra term is similar in form to the usual SPH pressure force (although opposite in direction) and is therefore straightforward to implement in any SPH code at almost no extra cost. For N−body codes some additional cost is involved as the formalism requires the computation of the density via a summation over neighbouring particles using the smoothing kernel. The results of numerical tests demonstrate that, for homogeneous mass distributions, the use of adaptive softening lengths gives a softening which is always close to the ‘optimal’ choice of fixed softening parameter, removing the need for fine-tuning. For a heterogeneous mass distribution (as may be found in any large scale N−body simulation) we find that the errors on the least-dense component are lowered by an order of magnitude compared to the use of a fixed softening length tuned to the densest component. For SPH codes our method presents a natural and elegant choice of softening formalism which makes a small improvement to both the force resolution and the total energy conservation at almost zero additional cost.
منابع مشابه
Non-Radiative Test of a New SPH Scheme
We adapt new schemes of gravitational N-body dynamics and smoothed particle hydrodynamics (SPH) to the tree N-body/SPH galactic chemodynamics code GCD+. The applied new schemes include the adaptive softening suggested by Price & Monaghan (2007), to improve the self-gravity calculation, and artificial viscosity and thermal conductivity suggested by Rosswog & Price (2007) and Price (2008), to mod...
متن کاملHigh Performance Direct Gravitational N-body Simulations on Graphics Processing Units II: An implementation in CUDA
We present the results of gravitational directN -body simulations using the Graphics Processing Unit (GPU) on a commercial NVIDIA GeForce 8800GTX designed for gaming computers. The force evaluation of the N -body problem is implemented in “Compute Unified Device Architecture” (CUDA) using the GPU to speed-up the calculations. We tested the implementation on three different N -body codes: two di...
متن کاملA compatibly differenced total energy conserving form of SPH
We describe a modified form of Smoothed Particle Hydrodynamics (SPH) in which the specific thermal energy equation is based on a compatibly differenced formalism, guaranteeing exact conservation of the total energy. We compare the errors and convergence rates of the standard and compatible SPH formalisms on analytic test problems involving shocks. We find that the new compatible formalism relia...
متن کاملVariational Integrators for the Gravitational N-body Problem
This paper describes a fourth-order integration algorithm for the gravitational N-body problem based on discrete Lagrangian mechanics. When used with shared time steps, the algorithm is momentum conserving and symplectic. We generalize the algorithm to handle individual time steps; this introduces fifth-order errors in angular momentum conservation and symplecticity. We show that using adaptive...
متن کاملGravitational Softening in Simulations with Adaptive Mass Resolution
Pairwise forces between particles in cosmological N-body simulations are generally softened to avoid hard collisions. Physically, this softening corresponds to treating the particles as diffuse clouds rather than point masses. For particles of unequal mass (and hence unequal softening length), computing the softened force involves a nontrivial double integral over the volumes of the two particl...
متن کامل